Arrays in CPP
Arrays
An array is a group of related data items that share a common name
● Store the values
● access the values
Example 01:
# include <iostream.h>
void main()
{
int
a[10]; //declaration
for
(int i=0;i<10;i++) //storing the values
cin>>a[i];
for
(int i=0;i<10;i++) // printing the values
cout<<a[i];
}
Comments